package pers.qianyu.month_202012.date_20201217;

/**
 * 344. 反转字符串
 * https://leetcode-cn.com/problems/reverse-string/
 *
 * @author mizzle rain
 * @date 2020-12-17 15:21
 */
public class ReverseString {
    public void reverseString(char[] s) {
        int left = 0, right = s.length - 1;
        while (left < right) {
            char temp = s[left];
            s[left] = s[right];
            s[right] = temp;
            left++;
            right--;
        }
    }
}
